#ifndef CACHECREATE_H
#define CACHECREATE_H

#include <QObject>
#include "CacheBase.h"

class CacheCreate : public CacheBase
{
    Q_OBJECT
private:
    /**
     * @brief 上传数据表创建字符串
     * 
     */
    static constexpr const char* s_userInfoTableCreateCmd = "\
                                            CREATE TABLE  IF NOT EXISTS Data1\
                                            ( \
                                            Id INTEGER PRIMARY KEY   AUTOINCREMENT,\
                                            Value1 TEXT NOT NULL, \
                                            Value2 TEXT NOT NULL \
                                            )";
    /**
     * @brief 公共数据表创建字段
     * 
     */
    static constexpr const char* s_commonInfoTableCreateCmd = "\
                                            CREATE TABLE IF NOT EXISTS Data2\
                                            ( \
                                            Id INTEGER PRIMARY KEY   AUTOINCREMENT UNIQUE,\
                                            Value1 TEXT NOT NULL \
                                            )";
    /**
     * @brief 重传数据表创建字符串
     * 
     */
    static constexpr const char* s_reuploadTableCreateCmd = " \
                                            CREATE TABLE IF NOT EXISTS Data3\
                                            ( \
                                            Id INTEGER PRIMARY KEY   AUTOINCREMENT,\
                                            Value1 TEXT NOT NULL, \
                                            Value2 TEXT NOT NULL \
                                            )";
    /**
     * @brief tid数据表创建字符串
     * 
     */
    static constexpr const char* s_tidInfoTableCreateCmd = "\
                                            CREATE TABLE IF NOT EXISTS Data4\
                                            ( \
                                                Value1 TEXT PRIMARY KEY NOT NULL UNIQUE\
                                            )";
public:
    /**
     * @brief Construct a new Cache Create object
     * 
     * @param parent 
     */
    CacheCreate(QObject *parent=nullptr);
public slots:
    /**
     * @brief 创建数据库表
     * 
     */
    void createTable();
};

#endif // CACHECREATE_H
